package com.fingard.dsp.bank.reqrespobj.frgcurrsingle;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.dsp.bank.reqrespobj.frgcurrsingle.detail.CJFrgCurrSingleDetail;
import com.fingard.xml.XmlTextReader;

/**
 * 海外--单笔付款请求
 */
public class ReqCJFrgCurrSingle extends RequestBase {

    public CJFrgCurrSingleDetail singleDetail = null;

    private XmlTextReader xmlReader;

    public ReqCJFrgCurrSingle(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception{
        reqHeader = p_header;
        xmlReader = p_xmlReader;

        if(xmlReader.read(PATH_Detail)){//"/ATSYH/TransReq/TransParam/DetailRecord"
            singleDetail = new CJFrgCurrSingleDetail(xmlReader.readedXElement);
        }
        else{
            throw new Exception("不存在节点："+PATH_Detail);
        }
    }
}
